package cn.iocoder.yudao.module.erp.controller.admin.common;


import cn.iocoder.yudao.module.erp.controller.admin.costinfo.vo.CostInfoRespVO;
import cn.iocoder.yudao.module.erp.controller.admin.planinfo.vo.PlanInfoRespVO;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;


public class BaseCost {
    private String flag;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate orderTime;

    public BaseCost(){
        if (this instanceof PlanInfoRespVO) {
            this.flag="plan";
            this.orderTime=((PlanInfoRespVO) this).getNowTime();
        }else if(this instanceof CostInfoRespVO){
            this.flag="cost";
            this.orderTime=((CostInfoRespVO) this).getGetTime();
        }
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public LocalDate getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(LocalDate orderTime) {
        this.orderTime = orderTime;
    }
}
